#include <Windows.h>
#include <cstdio>
#include "capturedFrameData.h"

tPoint3D capturedFrameData_applyMatrix(tTransformMatrix * m, tPoint3D p) {
	tPoint3D ret = {0, 0, 0};
	int * pRet = (int *)&ret;
	int * pP = (int *)&p;

	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			pRet[i] += (int)(m->m[i][j] * pP[j]);
		}
		pRet[i] += (int)(m->m[i][3]);
	}
	return ret;
}